package com.bdmc.car.domain.bo;

import com.bdmc.car.domain.CarMaintenanceDetail;
import com.bdmc.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;

;
/**
 * 维修信息业务对象 car_maintenance
 *
 * @author bdmc
 * @date 2023-01-06
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class CarMaintenanceBo extends BaseEntity {

    /**
     * 维修信息id
     */
    private Integer maintenanceId;

    /**
     * 维修报备人
     */
    private String reporter;

    /**
     * 车辆id
     */
    private Integer carId;

    private String carNum;

    /**
     * 维修送达时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate deliveryTime;

    /**
     * 维修完成时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate finishTime;

    /**
     * 总金额
     */
    private BigDecimal totalAmount;

    /**
     * 修车厂id
     */
    private Integer garageId;

    /**
     * 维修信息录入人
     */
    private String enterBy;

    /**
     * 维修单照片
     */
    private String photoList;


    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate deliveryTimeStart;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate deliveryTimeEnd;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate finishTimeStart;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate finishTimeEnd;

    private List<CarMaintenanceDetail> carMaintenanceDetailList;
}
